Browse Source

remember showtxhex for new tabs

bwt
Craig Raw 5 years ago
parent
commit
b420705db4
  1. 4
      src/main/java/com/sparrowwallet/sparrow/AppController.java
  2. 2
      src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java

4
src/main/java/com/sparrowwallet/sparrow/AppController.java

@ -42,6 +42,8 @@ public class AppController implements Initializable {
@FXML
private TabPane tabs;
public static boolean showTxHexProperty;
@Override
public void initialize(URL location, ResourceBundle resources) {
@ -78,6 +80,7 @@ public class AppController implements Initializable {
});
showTxHex.setSelected(true);
showTxHexProperty = true;
}
public void openFromFile(ActionEvent event) {
@ -167,6 +170,7 @@ public class AppController implements Initializable {
public void showTxHex(ActionEvent event) {
CheckMenuItem item = (CheckMenuItem)event.getSource();
EventManager.get().post(new TransactionTabChangedEvent(tabs.getSelectionModel().getSelectedItem(), item.isSelected()));
showTxHexProperty = item.isSelected();
}
public void openExamples(ActionEvent event) {

2
src/main/java/com/sparrowwallet/sparrow/transaction/TransactionController.java

@ -6,6 +6,7 @@ import com.sparrowwallet.drongo.protocol.*;
import com.sparrowwallet.drongo.psbt.PSBT;
import com.sparrowwallet.drongo.psbt.PSBTInput;
import com.sparrowwallet.drongo.psbt.PSBTOutput;
import com.sparrowwallet.sparrow.AppController;
import com.sparrowwallet.sparrow.EventManager;
import com.sparrowwallet.sparrow.event.TransactionChangedEvent;
import com.sparrowwallet.sparrow.event.TransactionTabChangedEvent;
@ -56,6 +57,7 @@ public class TransactionController implements Initializable {
private void initializeView() {
initializeTxTree();
transactionMasterDetail.setShowDetailNode(AppController.showTxHexProperty);
refreshTxHex();
}

Loading…
Cancel
Save