View Issue Details

IDProjectCategoryView StatusLast Update
0000303QElectroTechElement Editorpublic2024-05-09 12:40
Reportertmjb Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
PlatformApple M2OSMacOSOS Version14.4
Summary0000303: Shortcut to close element editor does not work
DescriptionTo close an element editor window, you have to use the window decoration.

Pressing CMD-W, which should be the default to close a window on any Mac-OS application, does not work at all.

There is also no menu entry, to close the element editor. The menu entry could be found in the Window Menu, which is not present, when in the element editor.


(Translated by DeepL)
Pour fermer une fenêtre de l'éditeur d'éléments, vous devez utiliser la décoration de la fenêtre.

L'appui sur CMD-W, qui devrait être l'option par défaut pour fermer une fenêtre dans n'importe quelle application Mac-OS, ne fonctionne pas du tout.

Il n'y a pas non plus d'entrée de menu pour fermer l'éditeur d'éléments. L'entrée de menu pourrait se trouver dans le menu Fenêtre, qui n'est pas présent lorsque l'on se trouve dans l'éditeur d'éléments.

Traduit avec DeepL.com (version gratuite)
Steps To Reproduce
  1. Open a project.
  2. Select a random element and right click on it.
  3. Choose Edit Element.
  4. Make sure, the new element editor window is the active window.
  5. Press CMD-W.


(Translated by DeepL)
  1. Ouvrez un projet.
  2. Sélectionnez un élément aléatoire et cliquez dessus avec le bouton droit de la souris.
  3. Choisissez Editer l'élément.
  4. Assurez-vous que la nouvelle fenêtre de l'éditeur d'éléments est la fenêtre active.
  5. Appuyez sur CMD-W.
TagsNo tags attached.

Activities

scorpio810

2024-05-08 12:21

administrator   ~0000702

There's no command to close the window in QET, but you can open several symbol editors in a row and close them one after the other with CMD-Q.

scorpio810

2024-05-08 12:25

administrator   ~0000703

https://github.com/qelectrotech/qelectrotech-source-mirror/blob/master/sources/editor/ui/qetelementeditor.cpp#L1000

https://github.com/qelectrotech/qelectrotech-source-mirror/blob/master/sources/editor/ui/qetelementeditor.cpp#L1396

scorpio810

2024-05-08 12:28

administrator   ~0000704

It makes no sense to add a close menu entry that does exactly the same thing as the quit menu command.

tmjb

2024-05-08 18:01

reporter   ~0000705

Hello Scorpio,

thank you for your ongoing strong support. It is very much appreciated!

When in the element editor and you open the menu "qelectrotech", the last item is listed as "Quit qelectrotech CMD-Q" (see attachment). "Quit"ing implies every instance of qelectrotech. (At least to me!)

There is a difference, between CMD-Q and CMD-W.

As given in the menu, CMD-Q is the shortcut for quit. CMD-W, on the other hand, is the shortcut to close the active window. In some cases, pressing CMD-W on the last window will not only delete the window but also terminate the app. For those apps, this behaviour is similar to CMD-Q. Most apps I use, will only delete the window but do not terminate the app itself.

The mnemonic of CMD-Q is "Quit" (as is printed in the menu), whilst CMD-W is the mnemonic of "Window".

Please have also a look at the Apple support pages, where CMD-W is described as

Command-W: Close the front window. To close all windows of the app, press Option-Command-W.

Apple

As long, as the menu say "Quit qelectrotech" I would be to scared to use CMD-Q.

The attached screenshot was taken from an element editor. If it would say "Quit QET Element Editor", that would be at least more precise, as CMD-Q in that case indeed does not terminate QET but only the element editor.

Therefore, I think, introducing CMD-W would be the right way to go.

Juts for comparisaon, I openend TeXStudio, which is also a third party open source app. The "TeXStudio" menu offers as last item "Quit TeXStudio CMD-Q" and within the "File" menu "Close CMD-W", as is shown in the other attachments. Of course, Quit/CMD-Q deletes all windows of TeXStudio, whilst Close/CMD-W will only delete the active window.

tmjb

2024-05-08 18:12

reporter   ~0000706

In the same way: It is common practise, that the app preferences are presented unter the name of the app and use the keyboard shortcut CMD-,. This is the case, when QET is set up to use english language, see the first attachment.

But when using german or french language, it is found under a different menu and the short cut does not work at all.

scorpio810

2024-05-08 18:23

administrator   ~0000707

Maybe a possible patch: Close this editor

--- sources/editor/ui/qetelementeditor.cpp
+++ sources/editor/ui/qetelementeditor.cpp
@@ -997,7 +997,6 @@ void QETElementEditor::setupActions()
     ui->m_open_from_file_action   -> setShortcut(tr("Ctrl+Shift+O"));
     ui->m_save_action             -> setShortcut(QKeySequence::Save);
     ui->m_save_as_file_action     -> setShortcut(tr("Ctrl+Shift+S"));
-	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+Q")));
     ui->m_select_all_act          -> setShortcut(QKeySequence::SelectAll);
     ui->m_deselect_all_action     -> setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
     ui->m_revert_selection_action -> setShortcut(QKeySequence(tr("Ctrl+I")));
@@ -1010,8 +1009,10 @@ void QETElementEditor::setupActions()
 
 #ifndef Q_OS_MAC
     ui->m_delete_action -> setShortcut(QKeySequence(Qt::Key_Delete));
+	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+Q")));
 #else
     ui->m_delete_action -> setShortcut(QKeySequence(tr("Backspace")));
+	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+W")));
 #endif
 
         //Depth action
--- sources/editor/ui/qetelementeditor.ui
+++ sources/editor/ui/qetelementeditor.ui
@@ -25,7 +25,7 @@
      <x>0</x>
      <y>0</y>
      <width>800</width>
-     <height>21</height>
+     <height>33</height>
     </rect>
    </property>
    <widget class="QMenu" name="m_file_menu">
@@ -283,7 +283,10 @@
      <normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
    </property>
    <property name="text">
-    <string>&Quitter</string>
+    <string>&Fermer cet éditeur</string>
+   </property>
+   <property name="toolTip">
+    <string>Quitter </string>
    </property>
   </action>
   <action name="m_deselect_all_action">

scorpio810

2024-05-08 18:26

administrator   ~0000708

--- sources/editor/ui/qetelementeditor.cpp
+++ sources/editor/ui/qetelementeditor.cpp
@@ -997,7 +997,6 @@ void QETElementEditor::setupActions()
     ui->m_open_from_file_action   -> setShortcut(tr("Ctrl+Shift+O"));
     ui->m_save_action             -> setShortcut(QKeySequence::Save);
     ui->m_save_as_file_action     -> setShortcut(tr("Ctrl+Shift+S"));
-	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+Q")));
     ui->m_select_all_act          -> setShortcut(QKeySequence::SelectAll);
     ui->m_deselect_all_action     -> setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
     ui->m_revert_selection_action -> setShortcut(QKeySequence(tr("Ctrl+I")));
@@ -1010,8 +1009,10 @@ void QETElementEditor::setupActions()
 
 #ifndef Q_OS_MAC
     ui->m_delete_action -> setShortcut(QKeySequence(Qt::Key_Delete));
+	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+Q")));
 #else
     ui->m_delete_action -> setShortcut(QKeySequence(tr("Backspace")));
+	ui->m_quit_action             -> setShortcut(QKeySequence(tr("Ctrl+W")));
 #endif
 
         //Depth action
--- sources/editor/ui/qetelementeditor.ui
+++ sources/editor/ui/qetelementeditor.ui
@@ -25,7 +25,7 @@
      <x>0</x>
      <y>0</y>
      <width>800</width>
-     <height>21</height>
+     <height>33</height>
     </rect>
    </property>
    <widget class="QMenu" name="m_file_menu">
@@ -283,7 +283,10 @@
      <normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
    </property>
    <property name="text">
-    <string>&Quitter</string>
+    <string>&Fermer cet éditeur</string>
+   </property>
+   <property name="toolTip">
+    <string>Fermer cet éditeur</string>
    </property>
   </action>
   <action name="m_deselect_all_action">

scorpio810

2024-05-08 19:53

administrator   ~0000709

tmjb

2024-05-08 21:09

reporter   ~0000710

Way cool!

You're the best!

scorpio810

2024-05-09 11:04

administrator   ~0000711

Thanks,
i can close this bug?

tmjb

2024-05-09 12:27

reporter   ~0000712

Yes please! :+1:

Issue History

Date Modified Username Field Change
2024-05-07 16:50 tmjb New Issue
2024-05-08 12:21 scorpio810 Note Added: 0000702
2024-05-08 12:25 scorpio810 Note Added: 0000703
2024-05-08 12:28 scorpio810 Note Added: 0000704
2024-05-08 18:01 tmjb Note Added: 0000705
2024-05-08 18:01 tmjb File Added: Bildschirmfoto 2024-05-08 um 17.28.23.png
2024-05-08 18:01 tmjb File Added: Bildschirmfoto 2024-05-08 um 17.56.01.png
2024-05-08 18:01 tmjb File Added: Bildschirmfoto 2024-05-08 um 17.56.09.png
2024-05-08 18:12 tmjb Note Added: 0000706
2024-05-08 18:12 tmjb File Added: Bildschirmfoto 2024-05-08 um 18.04.42.png
2024-05-08 18:12 tmjb File Added: Bildschirmfoto 2024-05-08 um 18.05.12.png
2024-05-08 18:12 tmjb File Added: Bildschirmfoto 2024-05-08 um 18.05.23.png
2024-05-08 18:12 tmjb File Added: Bildschirmfoto 2024-05-08 um 18.06.25.png
2024-05-08 18:23 scorpio810 Note Added: 0000707
2024-05-08 18:26 scorpio810 Note Added: 0000708
2024-05-08 19:53 scorpio810 Note Added: 0000709
2024-05-08 19:53 scorpio810 File Added: Capture d’écran 2024-05-08 à 19.51.21.png
2024-05-08 21:09 tmjb Note Added: 0000710
2024-05-09 11:04 scorpio810 Note Added: 0000711
2024-05-09 12:27 tmjb Note Added: 0000712
2024-05-09 12:40 scorpio810 Status new => resolved
2024-05-09 12:40 scorpio810 Resolution open => fixed