From ea31a5a60c0ef28c4004702e9bd14c37ba53ecce Mon Sep 17 00:00:00 2001 From: Kayila Date: Tue, 29 Oct 2019 22:48:44 -0400 Subject: [PATCH 1/3] Workaround for #640 Error which would (previously) cause a bunch of scary errors to appear due to a bug in the jdk when using three monitors. --- .../rptools/maptool/client/ui/MapToolFrame.java | 8 ++++++-- .../ui/assetpanel/ImageFileImagePanelModel.java | 10 +++++++++- .../client/ui/tokenpanel/TokenPanelTreeModel.java | 14 +++++++++++++- .../net/rptools/maptool/language/i18n.properties | 3 ++- .../rptools/maptool/language/i18n_de.properties | 1 + .../rptools/maptool/language/i18n_es.properties | 1 + .../rptools/maptool/language/i18n_fr.properties | 1 + .../rptools/maptool/language/i18n_it.properties | 1 + .../rptools/maptool/language/i18n_ja.properties | 1 + .../rptools/maptool/language/i18n_pl.properties | 1 + .../rptools/maptool/language/i18n_ru.properties | 1 + .../rptools/maptool/language/i18n_zh.properties | 1 + 12 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java b/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java index 90f9e2fe38..2409654fb8 100644 --- a/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java +++ b/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java @@ -677,10 +677,14 @@ private void configureDocking() { .loadInitialLayout( MapToolFrame.class.getClassLoader().getResourceAsStream(INITIAL_LAYOUT_XML)); } catch (ParserConfigurationException | SAXException | IOException e) { + MapTool.showError("msg.error.layoutInitial", e); + } + try { + getDockingManager() + .loadLayoutDataFromFile(AppUtil.getAppHome("config").getAbsolutePath() + "/layout.dat"); + } catch (IllegalArgumentException e) { MapTool.showError("msg.error.layoutParse", e); } - getDockingManager() - .loadLayoutDataFromFile(AppUtil.getAppHome("config").getAbsolutePath() + "/layout.dat"); } public DockableFrame getFrame(MTFrame frame) { diff --git a/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java b/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java index bfc67a7984..2e2e240a23 100644 --- a/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java +++ b/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java @@ -591,7 +591,15 @@ private void refresh() { } Collections.sort(fileList, filenameComparator); - MapTool.getFrame().getAssetPanel().updateGlobalSearchLabel(fileList.size()); + try { + MapTool.getFrame().getAssetPanel().updateGlobalSearchLabel(fileList.size()); + } catch (NullPointerException e) { + // This currently throws a NPE if the frame was not finished initializing when runs. For now, + // lets log a message + // and continue. + log.warn( + "NullPointerException encountered while trying to update ImageFileImagePanelModel global search label", e); + } } private static class ListFilesSwingWorker extends SwingWorker { diff --git a/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java b/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java index 194e866637..d475ec8019 100644 --- a/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java +++ b/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java @@ -37,8 +37,13 @@ import net.rptools.maptool.model.Token; import net.rptools.maptool.model.Zone; import net.rptools.maptool.server.ServerPolicy; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TokenPanelTreeModel implements TreeModel, ModelChangeListener { + + private static final Logger log = LogManager.getLogger(TokenPanelTreeModel.class); + private static final String _TOKENS = "panel.MapExplorer.View.TOKENS"; private static final String _PLAYERS = "panel.MapExplorer.View.PLAYERS"; private static final String _GROUPS = "panel.MapExplorer.View.GROUPS"; @@ -209,7 +214,14 @@ private void updateInternal() { // Plan to show all of the views in order to keep the order for (TokenFilter filter : filterList) { - if (filter.view.isAdmin && !MapTool.getPlayer().isGM()) { + try { + if (filter.view.isAdmin && !MapTool.getPlayer().isGM()) { + continue; + } + } catch (NullPointerException e) { + // This seems to happen when there was a problem creating the initial window. Lets just + // ignore this filter for now + log.warn("NullPointerException encountered while trying to update TokenPanelTreeModel", e); continue; } currentViewList.add(filter.view); diff --git a/src/main/resources/net/rptools/maptool/language/i18n.properties b/src/main/resources/net/rptools/maptool/language/i18n.properties index edef2809c5..45acb508a5 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n.properties @@ -1038,7 +1038,8 @@ msg.error.invalidLocalhost = "localhost" is not a valid addre # JVM Related msg.error.jvm.options = "{0}" is an invalid memory setting.

Be sure to enter a valid Java JVM value that includes a memory size that ends in K, M, or G.
e.g. 4M, 6G, 2048M, 1024K, etc.

Warning: An improper setting could prevent MapTool from starting. msg.error.lafSetup = Exception during look and feel setup. -msg.error.layoutParse = Could not parse the layout file. +msg.error.layoutInitial = Could not load the initial layout. +msg.error.layoutParse = Error parsing the layout file. msg.error.loadingIconImage = Could not load icon image. msg.error.loadingQuickMaps = Error loading quickmaps. msg.error.macro.buttonGroupDnDFail = Drag & Drop problem diff --git a/src/main/resources/net/rptools/maptool/language/i18n_de.properties b/src/main/resources/net/rptools/maptool/language/i18n_de.properties index 2468d6d555..521a58cdb2 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_de.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_de.properties @@ -954,6 +954,7 @@ msg.error.fogexpose = Du musst ein SL sein, um den Kri msg.error.gmRequired = Nur SL d\u00FCrfen das. msg.error.invalidLocalhost = "localhost" ist keine g\u00FCltige Adresse?! \u00DCberpr\u00FCfe Deine /etc/hosts Datei. msg.error.lafSetup = Ausnahmefall w\u00E4hrend der Einrichtung des Erscheinungsbildes. +msg.error.layoutInitial = Das ursprüngliche Layout konnte nicht geladen werden. msg.error.layoutParse = Kann die Gestaltungsdatei nicht analysieren. msg.error.loadingIconImage = Kann das Symbolbild nicht laden. msg.error.loadingQuickMaps = Fehler beim Laden der Schnellkarten. diff --git a/src/main/resources/net/rptools/maptool/language/i18n_es.properties b/src/main/resources/net/rptools/maptool/language/i18n_es.properties index c52f4ec7dd..fb5d54b9af 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_es.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_es.properties @@ -911,6 +911,7 @@ msg.error.fogexpose = Debe ser un GM para cambiar la N msg.error.gmRequired = S\u00F3lo los GM pueden hacer eso. msg.error.invalidLocalhost = 'localhost' no es una direcci\u00F3n v\u00E1lida?! Revisa tu archivo /etc/hosts. msg.error.lafSetup = Excepci\u00F3n durante el ajuste de aspecto. +msg.error.layoutInitial = No se pudo cargar el diseño inicial. msg.error.layoutParse = Imposible procesa el archivo de disposici\u00F3n. msg.error.loadingIconImage = Imposible cargar im\u00E1gen de icono. msg.error.loadingQuickMaps = Error al cargar mapas r\u00E1pidos. diff --git a/src/main/resources/net/rptools/maptool/language/i18n_fr.properties b/src/main/resources/net/rptools/maptool/language/i18n_fr.properties index 44b5695252..d451e64786 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_fr.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_fr.properties @@ -723,6 +723,7 @@ msg.error.fogexpose = Vous devez \u00EAtre MJ pour cha msg.error.gmRequired = Seuls les MJ peuvent faire cela. msg.error.invalidLocalhost = 'localhost' n'est pas une adresse valide ?! V\u00E9rifiez votre fichier /etc/hosts. msg.error.lafSetup = Une exception s'est produite durant la mise en place de l'interface ("look and feel") +msg.error.layoutInitial = Impossible de charger la mise en page initiale. msg.error.layoutParse = Le fichier de disposition n'a pu \u00EAtre analys\u00E9 msg.error.loadingIconImage = L'ic\u00F4ne n'a pas pu \u00EAtre charg\u00E9e msg.error.loadingQuickMaps = Erreur durant le chargement des cartes rapides diff --git a/src/main/resources/net/rptools/maptool/language/i18n_it.properties b/src/main/resources/net/rptools/maptool/language/i18n_it.properties index 002a32c2fc..8363d00642 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_it.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_it.properties @@ -790,6 +790,7 @@ msg.error.fogexpose = Devi essere un GM per cambiare l msg.error.gmRequired = Solo un GM pu\u00C3\u00B2 farlo. msg.error.invalidLocalhost = 'localhost' non \u00C3\u00A8 un indirizzo valido?! Controlla il tuo file /etc/hosts. msg.error.lafSetup = Eccezione durante il setup look and feel. +msg.error.layoutInitial = Impossibile caricare il layout iniziale. msg.error.layoutParse = Impossibile analizzare il file di layout. msg.error.loadingIconImage = Impossibile caricare l''immagine icona. msg.error.loadingQuickMaps = Errore caricando una mappa veloce. diff --git a/src/main/resources/net/rptools/maptool/language/i18n_ja.properties b/src/main/resources/net/rptools/maptool/language/i18n_ja.properties index f92200ba5a..5ed397084a 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_ja.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_ja.properties @@ -905,6 +905,7 @@ msg.error.fogexpose = \u4E0D\u660E\u9818\u57DF\u3092\u msg.error.gmRequired = \u3053\u306E\u64CD\u4F5C\u306FGM\u5C02\u7528\u3067\u3059\u3002 msg.error.invalidLocalhost = \u300Clocalhost\u300D\u304C\u6B63\u3057\u3044\u30A2\u30C9\u30EC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002/etc/hosts \u30D5\u30A1\u30A4\u30EB\u3092\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002 msg.error.lafSetup = Look and feel \u306E\u69CB\u6210\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 +msg.error.layoutInitial = \u521D\u671F\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002 msg.error.layoutParse = layout file \u3092\u30D1\u30FC\u30B9\u3067\u304D\u307E\u305B\u3093\u3002 msg.error.loadingIconImage = \u30A2\u30A4\u30B3\u30F3\u753B\u50CF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3002 msg.error.loadingQuickMaps = \u30AF\u30A4\u30C3\u30AF\u30DE\u30C3\u30D7\u306E\u8AAD\u307F\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u767A\u751F\u3002 diff --git a/src/main/resources/net/rptools/maptool/language/i18n_pl.properties b/src/main/resources/net/rptools/maptool/language/i18n_pl.properties index e804e081d5..b21df5b6fc 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_pl.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_pl.properties @@ -720,6 +720,7 @@ msg.error.fogexpose = Musisz byc GM zeby zmienic "fog msg.error.gmRequired = Tylko GM moze to zrobic. msg.error.invalidLocalhost = 'localhost' nie jest wlasciwym adresem?! Check your /etc/hosts file. msg.error.lafSetup = Exception during look and feel setup +msg.error.layoutInitial = Nie mo\u017Cna za\u0142adowa\u0107 pocz\u0105tkowego uk\u0142adu. msg.error.layoutParse = Could not parse the layout file msg.error.loadingIconImage = Nie mozna zaladowac obrazka ikony msg.error.loadingQuickMaps = Blad wczytywania szybkiej mapy diff --git a/src/main/resources/net/rptools/maptool/language/i18n_ru.properties b/src/main/resources/net/rptools/maptool/language/i18n_ru.properties index eb65dbadb1..91c639f066 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_ru.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_ru.properties @@ -723,6 +723,7 @@ msg.error.fogexpose = \u0422\u0440\u0435\u0431\u0443\u msg.error.gmRequired = \u042D\u0442\u043E \u043C\u043E\u0436\u0435\u0442 \u0434\u0435\u043B\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0413\u041C. msg.error.invalidLocalhost = 'localhost' \u043D\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441?! \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448 /etc/hosts \u0444\u0430\u0439\u043B. msg.error.lafSetup = \u0418\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0435 \u043E\u0431\u0437\u043E\u0440\u0430 \u0438 \u043E\u0449\u0443\u0449\u0435\u043D\u0438\u044F. +msg.error.layoutInitial = \u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043C\u0430\u043A\u0435\u0442. msg.error.layoutParse = \u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441\u0445\u0435\u043C\u044B. msg.error.loadingIconImage = \u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u044F\u0440\u043B\u044B\u043A\u0430. msg.error.loadingQuickMaps = \u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0431\u044B\u0441\u0442\u0440\u044B\u0445 \u043A\u0430\u0440\u0442. diff --git a/src/main/resources/net/rptools/maptool/language/i18n_zh.properties b/src/main/resources/net/rptools/maptool/language/i18n_zh.properties index 95b83c3ebe..923a786db2 100644 --- a/src/main/resources/net/rptools/maptool/language/i18n_zh.properties +++ b/src/main/resources/net/rptools/maptool/language/i18n_zh.properties @@ -968,6 +968,7 @@ msg.error.fogexpose = \u53EA\u6709\u6E38\u620F\u4E3B\u msg.error.gmRequired = \u53EA\u6709\u6E38\u620F\u4E3B\u6301\u4EBA\u53EF\u4EE5\u8FD9\u4E48\u505A msg.error.invalidLocalhost = \u672C\u5730\u4E3B\u673A\uFF08localhost\uFF09\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u5730\u5740\uFF01\u68C0\u67E5\u4F60\u7684hosts\u6587\u4EF6\u3002 msg.error.lafSetup = look and feel\u8BBE\u7F6E\u4E2D\u9047\u5230\u5F02\u5E38\u3002 +msg.error.layoutInitial = \u65E0\u6CD5\u52A0\u8F7D\u521D\u59CB\u5E03\u5C40\u3002 msg.error.layoutParse = \u65E0\u6CD5\u89E3\u6790\u5E03\u5C40\u6587\u4EF6\u3002 msg.error.loadingIconImage = \u65E0\u6CD5\u8BFB\u53D6\u56FE\u6807\u56FE\u7247\u3002 msg.error.loadingQuickMaps = \u8BFB\u53D6\u5FEB\u901F\u5730\u56FE\u9519\u8BEF\u3002 From c57ae6af01e28ef7255e11a0c809f8de594d88cf Mon Sep 17 00:00:00 2001 From: Kayila Date: Tue, 29 Oct 2019 22:57:27 -0400 Subject: [PATCH 2/3] Updated changelog --- CHANGE_LOG.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGE_LOG.md b/CHANGE_LOG.md index 81f4481010..9c3c1fe248 100644 --- a/CHANGE_LOG.md +++ b/CHANGE_LOG.md @@ -17,7 +17,7 @@ Enhancements - [#810][i810] New macro function `playClip` more suited for short sound FX clips. New convenience function `defineAudioSource` to allow you to assign a nickname to audio sources and refer to the nickname in the audio functions. Two existing audio functions were renamed as part of the other changes: `stopStream` -> `stopSound`, `getStreamProperties` -> `getSoundProperties`. - [#804][i804] Chat notification flash now picks flash color based on task bar color. - [#801][i801] Macro function `getTokenStates` now accepts Token ID and Map Name parameters. -- [#790][i790] New `execFunction` macro that works like `execLink` but is used for built-in macro functions and UDFs. +- [#790][i790] New `execFunction` macro that works like `execLink` but is used for built-in macro functions and UDFs. - [#784][i784] Macro function `json.toVars` now accepts JSON arrays as well as objects. - [#782][i782] Macro function `broadcast` no accepts "not-gm", "not-self" and "not-gm-self" as targets. - [#766][i766] New perlin noise overlay on tiled textures to reduce visible repetition. @@ -32,7 +32,7 @@ Bug Fixes - [#846][i846] `getInfo("server")` was returning true/false instead of 1/0 for "hosting server". Fixed. - [#822][i822] `playStream` was ignoring stream parameters set with `editStream`. Fixed. - [#820][i820] Functions `execLink` and `execFunction` were not running immediately on local client. Fixed. -- [#814][i814] Some `update` keywords for `copyToken` were producing exceptions. Fixed. Alternate keywords *tokenPortrait* and *tokenHandout* added +- [#814][i814] Some `update` keywords for `copyToken` were producing exceptions. Fixed. Alternate keywords *tokenPortrait* and *tokenHandout* added - [#803][i803] `getStreamProps` was returning malformed JSON. Fixed. - [#800][i800] Incorrect tooltip on Chat Notification Background preference. Fixed. - [#788][i788] Player clients were showing the last campaign file they had loaded in the title bar when connected to servers. Fixed. @@ -44,6 +44,7 @@ Bug Fixes - [#687][i687] The table functions `addTableEntry`, `createTable`, `setTableImage` and `setTableEntry` if passed an empty `AssetID` string would incorrectly put an empty "Asset://" into the entries asset id field. Fixed. `getTableImage` would thrown an exeption if no table image was set. Fixed. - [#627][i627] Version check on MapTool startup should no longer prompt for updates when using release candidates. - [#529][i529] Smileys are now working again. +- [#640][i640] Workaround for errors which occured when three monitors are in use. [i850]: https://github.com/RPTools/maptool/issues/850 [i850]: https://github.com/RPTools/maptool/issues/848 @@ -73,6 +74,7 @@ Bug Fixes [i642]: https://github.com/RPTools/maptool/issues/642 [i627]: https://github.com/RPTools/maptool/issues/627 [i529]: https://github.com/RPTools/maptool/issues/529 +[i640]: https://github.com/RPTools/maptool/issues/640 Maptool 1.5.6 ===== @@ -394,7 +396,7 @@ Enhancements * [getRolled][igrd]() * [getNewRolls][ignr]() * [clearRolls][icrl]() -* [#406][i406] - New [dice expression](http://www.lmwcs.com/rptools/wiki/Dice_Expressions) **XdYdhZ** (drop highest) and 7 others. +* [#406][i406] - New [dice expression](http://www.lmwcs.com/rptools/wiki/Dice_Expressions) **XdYdhZ** (drop highest) and 7 others. * [#355][i355] - Macro Editor details tab reorganized to give some fields more room. Macro button tooltip entry field made into a larger text area with HTML highlighting. Checkbox to enable/disable hotkey display on button. UDFs now show in auto-complete of macro editor with their tooltip as help text. * [#426][i426] - New Line & Radius templates that start at cells. New icons for all template types. * [#424][i424] - Auto-completion in macro editor now works even if complete function name has already been entered. @@ -406,7 +408,7 @@ Enhancements * [#106][i106] - Reset Size added to right-click menu for tokens/stamps. * [#299][i299] - Mouse pointer now visible when dragging tokens. * [#389][i389] - File -> Export -> Campaign File As... now supports converting back to non-decimal map units-per-cell values. -* [#332][i332] - Added support for multiple personal lights and setting color for personal lights. +* [#332][i332] - Added support for multiple personal lights and setting color for personal lights. [igrd]: http://www.lmwcs.com/rptools/wiki/getRolled [ignr]: http://www.lmwcs.com/rptools/wiki/getNewRolls @@ -465,8 +467,8 @@ Enhancements -[i50]: https://github.com/RPTools/maptool/issues/50 -[i107]: https://github.com/RPTools/maptool/issues/107 +[i50]: https://github.com/RPTools/maptool/issues/50 +[i107]: https://github.com/RPTools/maptool/issues/107 [i189]: https://github.com/RPTools/maptool/issues/189 [i255]: https://github.com/RPTools/maptool/issues/255 [i278]: https://github.com/RPTools/maptool/issues/278 @@ -537,7 +539,7 @@ A new shift+ctrl+spacebar command along with a new pointer image is now availabl * New RESTful functions getRequest & postRequest to send GET & POST requests to a URI. *Note: You must first turn access on in Preferences for these macro functions to work. * New function exportData exportData(FilePath file, String data, boolean appendToFile) which saves string data to external file. * New function getEnvironmentVariable(String name), Returns the value stored in the Environment Variable. -* New menu option added to the "Connections" window. Right clicking a player will offer a "Whisper" command that prepopulates the chat window with a whisper macro. +* New menu option added to the "Connections" window. Right clicking a player will offer a "Whisper" command that prepopulates the chat window with a whisper macro. * [#237][i237] - Added support to use shift-enter to insert newlines into the command entry box (also known as the chat entry box) * [#239][i239] - MapToolScriptTokenMaker now handles function names with . notation and dynamically pulls in all functions names. TokenMakerMaker no longer needs to be ran upon changes to MTScript. * [#240][i240] - Macro Editor now has Auto-Completion for macro functions! A brief description and summary can be displayed (these will be added as time permits) From 3f5102fbcbf31dd33f3b11288d0ebabd837efc66 Mon Sep 17 00:00:00 2001 From: Kayila Date: Tue, 29 Oct 2019 23:00:16 -0400 Subject: [PATCH 3/3] Updated comments --- .../java/net/rptools/maptool/client/ui/MapToolFrame.java | 3 +++ .../client/ui/assetpanel/ImageFileImagePanelModel.java | 6 +++--- .../maptool/client/ui/tokenpanel/TokenPanelTreeModel.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java b/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java index 2409654fb8..4a55f78934 100644 --- a/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java +++ b/src/main/java/net/rptools/maptool/client/ui/MapToolFrame.java @@ -683,6 +683,9 @@ private void configureDocking() { getDockingManager() .loadLayoutDataFromFile(AppUtil.getAppHome("config").getAbsolutePath() + "/layout.dat"); } catch (IllegalArgumentException e) { + // This error sometimes comes up when using three monitors due to a bug in the java jdk + // incorrectly + // reporting screen size as zero. MapTool.showError("msg.error.layoutParse", e); } } diff --git a/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java b/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java index 2e2e240a23..1bac55a9b7 100644 --- a/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java +++ b/src/main/java/net/rptools/maptool/client/ui/assetpanel/ImageFileImagePanelModel.java @@ -595,10 +595,10 @@ private void refresh() { MapTool.getFrame().getAssetPanel().updateGlobalSearchLabel(fileList.size()); } catch (NullPointerException e) { // This currently throws a NPE if the frame was not finished initializing when runs. For now, - // lets log a message - // and continue. + // lets log a message and continue. log.warn( - "NullPointerException encountered while trying to update ImageFileImagePanelModel global search label", e); + "NullPointerException encountered while trying to update ImageFileImagePanelModel global search label", + e); } } diff --git a/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java b/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java index d475ec8019..559eaac07b 100644 --- a/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java +++ b/src/main/java/net/rptools/maptool/client/ui/tokenpanel/TokenPanelTreeModel.java @@ -220,7 +220,7 @@ private void updateInternal() { } } catch (NullPointerException e) { // This seems to happen when there was a problem creating the initial window. Lets just - // ignore this filter for now + // ignore this filter for now. log.warn("NullPointerException encountered while trying to update TokenPanelTreeModel", e); continue; }