Skip to content

Hide viewer buttons when roto/tracker properties panel is minimized - #748

Merged
devernay merged 4 commits into
RB-2.4from
remove-viewer-buttons-when-panel-minimized
Jan 11, 2022
Merged

devernay merged 4 commits into
RB-2.4from
remove-viewer-buttons-when-panel-minimized

Conversation

@devernay

@devernay devernay commented Jan 11, 2022

Copy link
Copy Markdown
Member

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)

What does this pull request do?

  • addresses issue commented in #745 (review)
  • when panel is maximized, buttons are displayed even if viewer is not in render path (see Only display the overlays for nodes that are in the viewer render path and have their properties panel maximized. #744 for an explanation of that feature). This is not 100% satisfactory, but better than before IMHO
  • do not show the viewer buttons if a node is selected in the nodegraph but has its properties panel minimized
  • maximize properties panel when double-clicking a node in the nodegraph
  • minimized() and maximized() were originally two separate signals (in NodeSettingsPanel), so I kept it that way, but we could have simpler definitions of NodeGui::onSettingsPanelMinimized() and NodeGui::onSettingsPanelMaximized() that simply call NodeGui::onSettingsPanelClosed(true) or NodeGui::onSettingsPanelClosed(false).

Show a few screenshots (if this is a visual change)

N/A

Have you tested your changes (if applicable)? If so, how?

  • create a rotopaint node, connect to the viewer
  • create a rotopaint shape
  • minimize the rotopaint panel, the buttons in the Viewer should be removed [FIXED IN THIS PR]
  • create a tracker node, its buttons should appear in the viewer
  • select the rotopaint node in the nodegraph, its viewer buttons should not appear [FIXED IN THIS PR]
  • double-click the rotopaint node in the nodegraph, it will be maximized [FIXED IN THIS PR] and its viewer buttons replace those of the tracker node

- addresses issue commented in #745 (review)
- when panel maximized, buttons are displayed even if viewer is not in render path (see #744 for an explanation of that feature). This is not 100% satisfcatory, but better than before IMHO
- minimized() and maximized() were originally two separate signals (in NodeSettingsPanel), so I kept it that way, but we could have simpler definitions of NodeGui::onSettingsPanelMinimized() and NodeGui::onSettingsPanelMaximized() that simply call NodeGui::onSettingsPanelClosed(true) or NodeGui::onSettingsPanelClosed(false).
@devernay
devernay marked this pull request as draft January 11, 2022 01:51
@devernay

Copy link
Copy Markdown
Member Author

still an issue: when panel is minimize but node is selected in the nodegraph, the buttons are displayed

- maximize properties panel when double-clicking a node in the nodegraph
- do not show the viewer buttons if a node is selected in the nodegraph but has its properties panel minimized
@devernay
devernay removed the request for review from YakoYakoYokuYoku January 11, 2022 02:17
@devernay
devernay marked this pull request as ready for review January 11, 2022 02:17
Comment thread Gui/NodeSettingsPanel.cpp Outdated

QObject::connect( this, SIGNAL(closeChanged(bool)), NodeUi.get(), SLOT(onSettingsPanelClosedChanged(bool)) );
QObject::connect( this, SIGNAL(minimized()), NodeUi.get(), SLOT(onSettingsPanelMinimized(bool)) );
QObject::connect( this, SIGNAL(maximized()), NodeUi.get(), SLOT(onSettingsPanelMaximized(bool)) );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might have an oopsie here (at least in Qt5)

QObject::connect: No such slot Natron::NodeGui::onSettingsPanelMinimized(bool) in ../../Gui/NodeSettingsPanel.cpp:91
QObject::connect: No such slot Natron::NodeGui::onSettingsPanelMaximized(bool) in ../../Gui/NodeSettingsPanel.cpp:92
QObject::connect: No such slot Natron::NodeGui::onSettingsPanelMinimized(bool) in ../../Gui/NodeSettingsPanel.cpp:91
QObject::connect: No such slot Natron::NodeGui::onSettingsPanelMaximized(bool) in ../../Gui/NodeSettingsPanel.cpp:92

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! These lines are useless

@YakoYakoYokuYoku YakoYakoYokuYoku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from that bad connection I could confirm that this works.

@devernay
devernay merged commit b530320 into RB-2.4 Jan 11, 2022
@YakoYakoYokuYoku
YakoYakoYokuYoku deleted the remove-viewer-buttons-when-panel-minimized branch June 18, 2022 18:59
Niik-l pushed a commit to Niik-l/Natron that referenced this pull request Apr 8, 2026
…atronGitHub#748)

- addresses issue commented in [NatronGitHub#745 (review)](NatronGitHub#745 (review))
- when panel is maximized, buttons are displayed even if viewer is not in render path (see NatronGitHub#744 for an explanation of that feature). This is not 100% satisfactory, but better than before IMHO
- do not show the viewer buttons if a node is selected in the nodegraph but has its properties panel minimized
- maximize properties panel when double-clicking a node in the nodegraph
- minimized() and maximized() were originally two separate signals (in NodeSettingsPanel), so I kept it that way, but we could have simpler definitions of NodeGui::onSettingsPanelMinimized() and NodeGui::onSettingsPanelMaximized() that simply call NodeGui::onSettingsPanelClosed(true) or NodeGui::onSettingsPanelClosed(false).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants