| 1174 | } |
| 1175 | |
| 1176 | void ImGuiMenu::showModalMessage( const std::string& msg, NotificationType msgType ) |
| 1177 | { |
| 1178 | if ( msgType == NotificationType::Error ) |
| 1179 | spdlog::error( "Error Modal Dialog: {}", msg ); |
| 1180 | else if ( msgType == NotificationType::Warning ) |
| 1181 | spdlog::warn( "Warning Modal Dialog: {}", msg ); |
| 1182 | else // if ( msgType == MessageType::Info ) |
| 1183 | spdlog::info( "Info Modal Dialog: {}", msg ); |
| 1184 | showRenameModal_ = false; |
| 1185 | showInfoModal_ = true; |
| 1186 | needModalBgChange_ = true; |
| 1187 | modalMessageType_ = msgType; |
| 1188 | ImGui::CloseCurrentPopup(); |
| 1189 | storedModalMessage_ = msg; |
| 1190 | // this is needed to correctly resize modal window |
| 1191 | getViewerInstance().incrementForceRedrawFrames( 2, true ); |
| 1192 | |
| 1193 | // focus main window |
| 1194 | if ( ImGui::isMultiViewportEnabled() ) |
| 1195 | glfwFocusWindow( getViewerInstance().window ); |
| 1196 | } |
| 1197 | |
| 1198 | void ImGuiMenu::setupShortcuts_() |
| 1199 | { |
no test coverage detected