Uh oh!
There was an error while loading. Please reload this page.
MapEditorController: Refactor map notes window - #2272
Conversation
dg0yt
commented
Nov 25, 2024
IMO this dialog shouldn't be maintainted of the map_editor.cpp monster. |
dl3sdo
commented
Nov 25, 2024
I agree, and I will move it to a separate file. |
The map notes dialog was quite small and did not automatically adjust itself to the size of the map notes upon creation. This commit defines a minimum and maximum window size and adjusts the size wthin these limits according to the size of the map notes.
The map notes dialog had a non-standard button layout (with the Cancel button on the left side and the OK button on the right side). In addition both buttons were non-standard buttons (the OK button contained a green right arrow as icon). Change the map notes dialog layout to use standard buttons as for all other dialogs in Mapper.
42310c5 to
d0a2289Compare
dg0yt
left a comment
There was a problem hiding this comment.
Do we want to guard against map == nullptr?
| : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) | ||
| , map { map } | ||
| { | ||
| setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes")); |
There was a problem hiding this comment.
Either
| setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes")); | |
| setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapEditorController", "Map notes")); |
or
| setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes")); | |
| setWindowTitle(tr("Map notes")); |
There was a problem hiding this comment.
Choosing setWindowTitle(tr("Map notes"));
There was a problem hiding this comment.
Do we want to guard against map == nullptr?
I think that it's not possible to select this menu item without having a valid map. At least scaleMapClicked() does not check it neither and RotateMapDialog even does dereference the pointer.
There was a problem hiding this comment.
Okay... You are the key user for crashing other people's software.
| width = qMax(300, qMin(width, bounding_rect.width() + 60)); | ||
| height = qMax(200, qMin(height, bounding_rect.height() + 80)); |
There was a problem hiding this comment.
| width = qMax(300, qMin(width, bounding_rect.width() + 60)); | |
| height = qMax(200, qMin(height, bounding_rect.height() + 80)); | |
| width = qBound(300, width, bounding_rect.width() + 60); | |
| height = qBound(200, height, bounding_rect.height() + 80); |
PappyEric
commented
Nov 26, 2024
via email
Sooo seriously, when are we going to get a release that doesn't take a technical degree to install???
Keep making excuses, and keep turning away supporters.
Sent from Proton Mail Android …-------- Original Message -------- On 11/26/24 1:08 AM, Kai Pastor wrote:
@dg0yt commented on this pull request.
Do we want to guard against map == nullptr?
---------------------------------------------------------------
In [src/gui/map/map_notes.cpp](#2272 (comment)):
> +#include <QScreen>
+#include <QSize>
+#include <QTextEdit>
+#include <QVBoxLayout>
+#include <QWidget>
+
+#include "core/map.h"
+
+
+namespace OpenOrienteering {
+
+MapNotesDialog::MapNotesDialog(QWidget* parent, Map* map)
+: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
+, map { map }
+{
+ setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes"));
Either
⬇️ Suggested change
- setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes"));
+ setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapEditorController", "Map notes"));
or
⬇️ Suggested change
- setWindowTitle(QCoreApplication::translate("OpenOrienteering::MapNotes", "Map notes"));
+ setWindowTitle(tr("Map notes"));
---------------------------------------------------------------
In [src/gui/map/map_notes.cpp](#2272 (comment)):
> + width = qMax(300, qMin(width, bounding_rect.width() + 60));
+ height = qMax(200, qMin(height, bounding_rect.height() + 80));
⬇️ Suggested change
- width = qMax(300, qMin(width, bounding_rect.width() + 60));
- height = qMax(200, qMin(height, bounding_rect.height() + 80));
+ width = qBound(300, width, bounding_rect.width() + 60);
+ height = qBound(200, height, bounding_rect.height() + 80);
—
Reply to this email directly, [view it on GitHub](#2272 (review)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AEKV6JXA6E5WOKDVUTBZAH32CQF4NAVCNFSM6AAAAABMA4OTO2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDINRQGQZDSMJUHE).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***> |
dg0yt
commented
Nov 26, 2024
Be careful. Humans on both sides. |
PappyEric
commented
Nov 26, 2024
via email
Yes, I've tried to follow the documentation to install openorienteering a few times and failed. Is the documentation out of date? I only see the same few people create commits here. This doesn't seem like an Open architecture since it's been several, several years since updating the main core.
Sent from Proton Mail Android …-------- Original Message -------- On 11/26/24 2:06 AM, Kai Pastor wrote:
> Take a technical degree to install???
Be careful. Humans on both sides.
—
Reply to this email directly, [view it on GitHub](#2272 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AEKV6JXP4IGCQHUNGIRNC7L2CQMYTAVCNFSM6AAAAABMA4OTO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZHAZDCNRRHA).
You are receiving this because you commented.Message ID: ***@***.***> |
PappyEric
commented
Nov 26, 2024
via email
Let me reiterate, I've tried to install the GIT version of Openorienteering so I could maybe add some input. Tried, and tried again.
From an outsider it seems like there's just a select few of people that can contribute.
Just make a new release ...
Sent from Proton Mail Android …-------- Original Message -------- On 11/26/24 2:19 AM, wrote:
Yes, I've tried to follow the documentation to install openorienteering a few times and failed. Is the documentation out of date? I only see the same few people create commits here. This doesn't seem like an Open architecture since it's been several, several years since updating the main core.
Sent from Proton Mail Android
-------- Original Message --------
On 11/26/24 2:06 AM, Kai Pastor wrote:
>> Take a technical degree to install???
>
> Be careful. Humans on both sides.
>
> —
> Reply to this email directly, [view it on GitHub](#2272 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AEKV6JXP4IGCQHUNGIRNC7L2CQMYTAVCNFSM6AAAAABMA4OTO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZHAZDCNRRHA).
> You are receiving this because you commented.Message ID: ***@***.***> |
dg0yt
commented
Nov 26, 2024
Let me reiterate: |
PappyEric
commented
Nov 26, 2024
via email
You're slowing things down.
Sent from Proton Mail Android …-------- Original Message -------- On 11/26/24 2:40 AM, Kai Pastor wrote:
> Let me reiterate, I've tried to install the GIT version of Openorienteering so I could maybe add some input. Tried, and tried again.
Let me reiterate:
If you want to ask for help with building from source, open an issue or discussion.
If you want to not slow down things, kindly avoid rants on unrelated issues and PRs.
—
Reply to this email directly, [view it on GitHub](#2272 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AEKV6JWBRGU3H5QLB2NCI732CQQVLAVCNFSM6AAAAABMA4OTO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZHA4DINZYGQ).
You are receiving this because you commented.Message ID: ***@***.***> |
dg0yt
commented
Nov 26, 2024
@PappyEric Sorry, I have to put you on my block list. Toxic discussion are not beneficial. |
lpechacek
commented
Nov 26, 2024
@PappyEric No matter how much I understand your position and why you are discussing your issue right here, please mind that discussion is off-topic in the context of this code pull request. The Discussions place might be a better home for conversations about the project leadership, perhaps with a more articulated set of reproaches and honors towards the OO developers team. Thanks! |
PappyEric
commented
Nov 26, 2024
Sorry |
dl3sdo
commented
Nov 26, 2024
Shall I keep three commits (I would split the 4th one and squash appropriately) or shall I squash and update the commit message? |
dg0yt
commented
Nov 26, 2024
I would squash the PR with the merge. Unless you want control over the commit message 😄 |
Consider app window size instead of screen size. Consider max line length for better readability.
73b32dd to
382ec0fComparedg0yt
commented
Nov 29, 2024
dg0yt
commented
Nov 29, 2024
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
dg0yt
commented
Nov 29, 2024
I should really fix the flaky hdiutil job at its root 😠 |
Moved out of MapEditorController. Improved window size calculation using available space while maintaining a readable max width. Use standard buttons and layout for map notes dialog. Co-authored-by: Kai Pastor <dg0yt@darc.de>

The map notes dialog was quite small and did not automatically adjust itself to the size of the map notes upon creation. This commit defines a minimum and maximum window size and adjusts the size wthin these limits according to the size of the map notes.
Closes#2119